var postsData = require('../../n_data/n_data.js');
Page({
  data: {

  },
  onLoad: function () {

    // this.data.postList = postsData.postList
    this.setData({
      postList: postsData.postList
    });
  },

  onTap: function (event) {
    var postId = event.currentTarget.dataset.postid;
    // console.log("on post id is" + postId);
    wx.navigateTo({
      url: "post_detail/post_detail?id=" + postId
    })
  },

  onSwiperTap: function (event) {
    var postId = event.target.dataset.postid;
    wx.navigateTo({
      url: "post_detail/post_detail?id=" + postId
    })
  }
})
